import $ from 'jquery'
import Swiper from 'swiper'

$('.home-scheme-tab').on('click', '.home-scheme-tab__item', function (e) {
  const index = $(this).index()
  $(this).addClass('active').siblings().removeClass('active')
  $('.home-scheme-tab__content').children().eq(index).addClass('active').siblings().removeClass('active')
})

new Swiper('.swiper-container', {
  autoplay: {
    delay: 3000
  },
  slidesPerView: 1,
  spaceBetween: 0,
  loop: true,
  speed: 600,
  pagination: {
    el: '.swiper-pagination',
    type: 'bullets'
  }
  // 导航
  // navigation: {
  //   nextEl: '.swiper-button-next',
  //   prevEl: '.swiper-button-prev'
  // }
})
